#ifndef __LOADRTU_STATE_H_
#define __LOADRTU_STATE_H_

#include "common_def.h"


typedef enum LOADRTU_STATE_T
{
    LOADRTU_INVALID             = 0xFF,
    LOADRTU_IDLE,
    LOADRTU_CALCULATING_CYCLE,
    LOADRTU_COLLECTING,
    LOADRTU_COMMUNICATING,
    LOADRTU_DEBUGGING,
    LOADRTU_SLEEPING,
    LOADRTU_UPDATA,

} LOADRTU_STATE_T;

typedef void (*LOADRTU_STATE_ENTER_T)(LOADRTU_STATE_T last_state);
typedef void (*LOADRTU_STATE_EXIT_T)(LOADRTU_STATE_T next_state);

void loadrtu_state_change(LOADRTU_STATE_T from, LOADRTU_STATE_T to);
const uint8* loadrtu_state_name(LOADRTU_STATE_T state);

#endif  // __LOADRTU_STATE_H_

